=head1 BASE INFORMATION

=head2 Filename

Demo.pm

=head2 Path

/lib/Model/

=head2 Notes

=head2 ToDo's

=head2 Revision

=over 4

=item *

$HeadURL: http://catwork.googlecode.com/svn/trunk/lib/catwork/Model/Demo.pm $

=item * 

$Id: Demo.pm 2 2011-03-20 16:14:09Z hg.winkler.77 $

=back

=head2 Header Source Code

=cut

package catwork::Model::Demo;
use Moose;
use namespace::autoclean;

use Net::Stomp;

extends 'Catalyst::Model';

=head1 NAME

catwork::Model::Demo - Catalyst Model

=head1 DESCRIPTION

catwOrk Demo Model.

=head1 METHODS

=cut

=head2 mq_write( $c, $search )

this function write a Stomp message to the Apache MQ

=head3 source code

=cut

sub mq_write
{
    my ($self, $c, $message) = @_;

    my $stomp = Net::Stomp->new({
       hostname => 'localhost',
       port     => 61613,
    });
    $stomp->connect();

    $stomp->send( { destination => '/queue/home', body => $message } );
}


=head1 AUTHOR

A clever guy

Yes, Maik Schüller <maik.schueller@x-oss.de>

=head1 LICENSE

This library is free software. You can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

__PACKAGE__->meta->make_immutable;

1;
